package com.investindo.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public abstract class EuInvestindoConnectionFactory {
    private static Connection conn = null;            
    private Statement stmt = null;
    private String sql = null;
    private ResultSet rs = null;
   
	public static Connection getConn() {
		if(conn == null)
			try {
				Class.forName("org.postgresql.Driver");  
	            conn = DriverManager.getConnection("jdbc:postgresql://localhost:5432/Investindo","postgres", "carty17*");  
	           
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (ClassNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}   
		return conn;
	}
	public static void setConn(Connection conn) {
		EuInvestindoConnectionFactory.conn = conn;
	}
}
